var EnjoyHint=function(t){var e,i=this,n=jQuery.extend({onStart:function(){},onEnd:function(){},onSkip:function(){},onNext:function(){}},t),a=[],r=0;$body=jQuery("body");var s=function(t){t.preventDefault()},o=function(){jQuery(".enjoyhint").remove(),$body.css({overflow:"auto"}),jQuery(document).off("touchmove",s)};i.clear=function(){var t=jQuery(".enjoyhint_next_btn"),e=jQuery(".enjoyhint_skip_btn");t.removeClass(i.nextUserClass),t.text("Next"),e.removeClass(i.skipUserClass),e.text("Skip")};var c=function(){if(!a||!a[r])return $body.enjoyhint("hide"),n.onEnd(),void o();n.onNext();var t=jQuery(".enjoyhint");t.removeClass("enjoyhint-step-"+r),t.removeClass("enjoyhint-step-"+(r+1)),t.addClass("enjoyhint-step-"+(r+1));var s=a[r];s.onBeforeStart&&"function"==typeof s.onBeforeStart&&s.onBeforeStart();var h=s.timeout||0;setTimeout(function(){if(!s.selector)for(var t in s)s.hasOwnProperty(t)&&t.split(" ")[1]&&(s.selector=t.split(" ")[1],s.event=t.split(" ")[0],"next"!=t.split(" ")[0]&&"auto"!=t.split(" ")[0]&&"custom"!=t.split(" ")[0]||(s.event_type=t.split(" ")[0]),s.description=s[t]);setTimeout(function(){i.clear()},250),jQuery(document.body).scrollTop(s.selector,s.scrollAnimationSpeed||250,{offset:-100}),setTimeout(function(){var t=jQuery(s.selector),n=d(s.event);if($body.enjoyhint("show"),$body.enjoyhint("hide_next"),e=t,s.event_selector&&(e=jQuery(s.event_selector)),s.event_type||"key"!=s.event||t.keydown(function(t){t.which==s.keyCode&&(r++,c())}),1==s.showNext&&$body.enjoyhint("show_next"),0==s.showSkip?$body.enjoyhint("hide_skip"):$body.enjoyhint("show_skip"),s.showSkip,s.nextButton){var a=jQuery(".enjoyhint_next_btn");a.addClass(s.nextButton.className||""),a.text(s.nextButton.text||"Next"),i.nextUserClass=s.nextButton.className}if(s.skipButton){var o=jQuery(".enjoyhint_skip_btn");o.addClass(s.skipButton.className||""),o.text(s.skipButton.text||"Skip"),i.skipUserClass=s.skipButton.className}if(s.event_type)switch(s.event_type){case"auto":return t[s.event](),s.event,r++,void c();case"custom":u(s.event,function(){r++,f(s.event),c()});break;case"next":$body.enjoyhint("show_next")}else e.on(n,function(t){s.keyCode&&t.keyCode!=s.keyCode||(r++,jQuery(this).off(n),c())});var h=Math.max(t.outerWidth(),t.outerHeight()),l=s.radius||Math.round(h/2)+5,g=t.offset(),p=t.outerWidth(),v=t.outerHeight(),y=void 0!==s.margin?s.margin:10,_={x:g.left+Math.round(p/2),y:g.top+Math.round(v/2)-jQuery(document).scrollTop()},K={enjoyHintElementSelector:s.selector,center_x:_.x,center_y:_.y,text:s.description,top:s.top,bottom:s.bottom,left:s.left,right:s.right,margin:s.margin,scroll:s.scroll};s.shape&&"circle"==s.shape?(K.shape="circle",K.radius=l):(K.radius=0,K.width=p+y,K.height=v+y),$body.enjoyhint("render_label_with_shape",K,i.stop)},s.scrollAnimationSpeed+20||270)},h)},h=function(){r++,c()},l=function(){var t=a[r],e=jQuery(t.selector);f(t.event),e.off(d(t.event)),o()},d=function(t,e){return t+(e?"custom":"")+".enjoy_hint"},u=function(t,e){$body.on(d(t,!0),e)},f=function(t){$body.off(d(t,!0))};window.addEventListener("resize",function(){null!=e&&$body.enjoyhint("redo_events_near_rect",e[0].getBoundingClientRect())}),i.stop=function(){l()},i.reRunScript=function(t){r=t,c()},i.runScript=function(){r=0,n.onStart(),c()},i.resumeScript=function(){c()},i.setCurrentStep=function(t){r=t},i.getCurrentStep=function(){return r},i.trigger=function(t){switch(t){case"next":h();break;case"skip":l()}},i.setScript=function(t){t&&(a=t)},i.set=function(t){i.setScript(t)},i.setSteps=function(t){i.setScript(t)},i.run=function(){i.runScript()},i.resume=function(){i.resumeScript()},jQuery(".enjoyhint")&&jQuery(".enjoyhint").remove(),$body.css({overflow:"hidden"}),jQuery(document).on("touchmove",s),$body.enjoyhint({onNextClick:function(){h()},onSkipClick:function(){n.onSkip(),l()}})};CanvasRenderingContext2D.prototype.roundRect=function(t,e,i,n,a){return i<2*a&&(a=i/2),n<2*a&&(a=n/2),this.beginPath(),this.moveTo(t+a,e),this.arcTo(t+i,e,t+i,e+n,a),this.arcTo(t+i,e+n,t,e+n,a),this.arcTo(t,e+n,t,e,a),this.arcTo(t,e,t+i,e,a),this.closePath(),this},function(t){var e,i,n,a,r,s,o,c=window.innerWidth,h=window.innerHeight,l={init:function(t){return this.each(function(){this.enjoyhint_obj={},(e=this.enjoyhint_obj).resetComponentStuff=function(){i=null,n=null,a=null,r=null,s=null,null,o=null,null,null,null,c=window.innerWidth,h=window.innerHeight};var l=jQuery(this);function d(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg",t);for(var n in e)i.setAttribute(n,e[n]);return i}e.options=jQuery.extend({onNextClick:function(){},onSkipClick:function(){},animation_time:800},t),e.gcl={chooser:"enjoyhint"},e.cl={enjoy_hint:"enjoyhint",hide:"enjoyhint_hide",disable_events_element:"enjoyhint_disable_events",btn:"enjoyhint_btn",skip_btn:"enjoyhint_skip_btn",close_btn:"enjoyhint_close_btn",next_btn:"enjoyhint_next_btn",main_canvas:"enjoyhint_canvas",main_svg:"enjoyhint_svg",svg_wrapper:"enjoyhint_svg_wrapper",svg_transparent:"enjoyhint_svg_transparent",kinetic_container:"kinetic_container"},e.canvas_size={w:1.4*jQuery(window).width(),h:1.4*jQuery(window).height()};e.enjoyhint=jQuery("
",{class:e.cl.enjoy_hint+" "+e.cl.svg_transparent}).appendTo(l),e.enjoyhint_svg_wrapper=jQuery("
",{class:e.cl.svg_wrapper+" "+e.cl.svg_transparent}).appendTo(e.enjoyhint),e.$stage_container=jQuery('
').appendTo(e.enjoyhint),e.$canvas=jQuery('